package app.fugema.shop.main.center.adapter;

import android.view.View;

import com.base.common.view.adapter.ada.GeneralRecyclerAdapter;
import com.base.common.view.adapter.connector.BaseUniversalItemMultiType;

import app.fugema.shop.R;
import app.fugema.shop.main.order.adapter.OrderAddrMultiType;
import app.fugema.shop.main.order.adapter.OrderFooterMultiType;
import app.fugema.shop.main.order.model.OrderExpressResult;
import app.fugema.shop.main.order.view.DeliveryCheckDetailActivity;

public class GiftDetailAdapter extends GeneralRecyclerAdapter
{

    public GiftDetailAdapter()
    {
        init();
    }

    @Override
    public void initMultiItemType()
    {

        //物流信息
        putMultiItemType(new BaseUniversalItemMultiType<OrderExpressResult>(R.layout.shopping_delivery_check_item) {
            @Override
            public int getItemViewType() {
                return TYPE_HEAD_ONE;
            }

            @Override
            public void onItemClick(View view, int onclickType, int position, OrderExpressResult bean) {
                super.onItemClick(view, onclickType, position, bean);
                // 这里要传 订单的id
                DeliveryCheckDetailActivity.start(view.getContext(), bean.getOrderId());
            }
        });
        putMultiItemType(new OrderAddrMultiType());
        putMultiItemType(new GiftDetailItemMultiType());
        //订单时间支付方式
        putMultiItemType(new GiftFooterMultiType());
        //ViewUtils.setViewHeight(binding.givImage, DensityUtil.getDimens(R.dimen.dp_186));
    }
}
